x86/HVM: move per-vendor function tables into .init.data
authorJan Beulich <jbeulich@suse.com>
Mon, 29 Apr 2013 13:46:15 +0000 (15:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 29 Apr 2013 13:46:15 +0000 (15:46 +0200)
commit0352856935590a6b740306f2559fe204908472c9
tree59385b837a4467adc818d2845009c11f8b5e6550
parenta7ac9597a7fc6ca934957eb78b41e26638281953
x86/HVM: move per-vendor function tables into .init.data

hvm_enable() copies the table contents rather than storing the pointer,
so there's no need to keep these tables post-boot.

Also constify the return values of the per-vendor initialization
functions, making clear that once the per-vendor initialization is
complete, the vendor specific tables won't get modified anymore.

Finally, in hvm_enable(), use the returned pointer for all read
accesses as being more efficient than global variable accesses. Writes
of course still need to go to the global variable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/hvm.h